home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Form1"
- ClientHeight = 5415
- ClientLeft = 1200
- ClientTop = 600
- ClientWidth = 7365
- Height = 5820
- Left = 1140
- LinkTopic = "Form1"
- ScaleHeight = 5415
- ScaleWidth = 7365
- Top = 255
- Width = 7485
- Begin TextBox txt_file
- Height = 375
- Left = 1080
- TabIndex = 9
- Text = "C:\LPR\PRINT.PRN"
- Top = 840
- Width = 1815
- End
- Begin CommandButton Command5
- Caption = "Print File"
- Height = 495
- Left = 3120
- TabIndex = 7
- Top = 120
- Width = 1935
- End
- Begin LPR LPR1
- DataFile = "C:\AUTOEXEC.BAT"
- Host = ""
- JobName = "STEVESJOB"
- Left = 720
- List = ""
- Port = 515
- Printer = "lp"
- PrintType = 0 'Postscript
- Top = 1680
- User = "SBRIDGES"
- End
- Begin CommandButton Command4
- Caption = "Remove Jobs"
- Height = 495
- Left = 5160
- TabIndex = 6
- Top = 2280
- Width = 1935
- End
- Begin ListBox List1
- Height = 1980
- Left = 120
- TabIndex = 5
- Top = 3360
- Width = 7095
- End
- Begin CommandButton Command3
- Caption = "Print Waiting"
- Height = 495
- Left = 5160
- TabIndex = 4
- Top = 1560
- Width = 1935
- End
- Begin CommandButton Command2
- Caption = "Queue State (L)"
- Height = 495
- Left = 5160
- TabIndex = 3
- Top = 840
- Width = 1935
- End
- Begin TextBox txt_host
- Height = 285
- Left = 1080
- TabIndex = 2
- Text = "3.100.36.21"
- Top = 240
- Width = 1815
- End
- Begin CommandButton Command1
- Caption = "Queue State (S)"
- Height = 495
- Left = 5160
- TabIndex = 0
- Top = 120
- Width = 1935
- End
- Begin Label Label2
- Caption = "File To Print:"
- Height = 495
- Left = 120
- TabIndex = 8
- Top = 960
- Width = 735
- End
- Begin Label Label1
- Caption = "Host:"
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 240
- Width = 735
- End
- Option Explicit
- Sub Command1_Click ()
- list1.Clear
- lpr1.Host = Trim$(txt_host)
- screen.MousePointer = 11
- lpr1.Action = 2
- End Sub
- Sub Command2_Click ()
- list1.Clear
- lpr1.DebugMode = 1
- lpr1.Host = Trim$(txt_host)
- screen.MousePointer = 11
- lpr1.Action = 3
- End Sub
- Sub Command3_Click ()
- list1.Clear
- lpr1.Host = Trim$(txt_host)
- screen.MousePointer = 11
- lpr1.Action = 0
- End Sub
- Sub Command4_Click ()
- list1.Clear
- lpr1.Host = Trim$(txt_host)
- screen.MousePointer = 11
- lpr1.Action = 4
- End Sub
- Sub Command5_Click ()
- list1.Clear
- lpr1.Host = Trim$(txt_host)
- lpr1.PrintType = 3
- lpr1.DebugMode = 1
- lpr1.DataFile = Trim$(txt_file)
- screen.MousePointer = 11
- lpr1.Action = 1
- End Sub
- Sub LPR1_AsyncError (LprCMD As Integer, WinsockError As Integer)
- list1.AddItem "ASYNC ERR. cmd=" & Str$(LprCMD) & " Sock err=" & Str$(WinsockError)
- End Sub
- Sub LPR1_PrintAnyWaitingJobs (returnCode As Integer)
- list1.AddItem "rc = " & Str$(returnCode)
- list1.Refresh
- screen.MousePointer = 0
- End Sub
- Sub LPR1_PrintFile (PrtType As Integer, returnCode As Integer)
- list1.AddItem "PrtType = " & Str$(PrtType) & " rc = " & Str$(returnCode)
- list1.Refresh
- If PrtType = 5 Then screen.MousePointer = 0
- End Sub
- Sub LPR1_QueueStateLong (noMore As Integer, Msg As String, ErrCode As Integer)
- list1.AddItem "NoMore = " & Str$(noMore) & " Msg = " & Msg & " Err = " & Str$(ErrCode)
- list1.Refresh
- If noMore Then screen.MousePointer = 0
- End Sub
- Sub LPR1_QueueStateShort (noMore As Integer, Msg As String, ErrCode As Integer)
- list1.AddItem "NoMore = " & Str$(noMore) & " Msg = " & Msg & " Err = " & Str$(ErrCode)
- list1.Refresh
- If noMore Then screen.MousePointer = 0
- End Sub
- Sub LPR1_RemoveJobs (returnCode As Integer)
- list1.AddItem "rc = " & Str$(returnCode)
- list1.Refresh
- screen.MousePointer = 0
- End Sub
-